<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script>
      /* 
        打印1-100之间所有7的倍数的个数及总和
         */

      var sum = 0;
      var count = 0;
      // 打印1-100之间的数
      for (var i = 1; i <= 100; i++) {
        // 判断i是否是7的倍数
        if (i % 7 == 0) {
          console.log(i);
          sum += i;

          count++;
        }
      }
      console.log("总和为" + sum);
      console.log("总数量" + count);
    </script>
  </head>
  <body></body>
</html>
